﻿using AnesSystem.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.Controls
{
    public class BaseVitalCellCtrl : BaseCustomCtrl
    {

        #region Variables

        protected bool _isReadOnly = false;

        #endregion

        #region Constructor

        public BaseVitalCellCtrl()
        {
            SaveModel = 1;

            LeftVital = new PatientVitalSignsModel();
        }

        #endregion

        #region Properties

        public int CellIndex { get; set; }
        public int RowIndex { get; set; }

        public bool IsSelected { get; set; }

        /// <summary>
        /// （默认不验证）0：不验证 1：纯数字验证 2：double验证
        /// </summary>
        //public int VerifierModel
        //{
        //    set
        //    {
        //        _txtValue.VerifierModel = value;
        //    }
        //}

        public PatientVitalSignsModel LeftVital { get; set; }

        public PatientVitalSignsModel SelfVital { get; set; }

        public virtual bool IsReadOnly
        {
            get
            {
                return _isReadOnly;
            }
            set
            {
                _isReadOnly = value;
            }
        }

        /// <summary>
        /// 由于tab、左右键的原因，控件失去焦点，value值还没有改变
        /// 所以加上一个IngValue，及时值
        /// </summary>
        public string IngValue { get; set; }


        #endregion

        #region 依赖属性


        #endregion

        #region Event


        #endregion

        #region Private Methods

        #endregion

        #region Public/Protected Methods

        public virtual void SetFocus()
        {
            this.Focus();
        }

        #endregion

        #region EventHandlers





        #endregion


    }
}
